<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view>
			<text class="title" id="cj" ref="box">{{title}}</text>
		</view>
		<button type="default" open-type="share" class="share-item__button">
			<!-- <image class="share-item__icon" :src="resolveStaticImgPath('uni.png')" mode=""></image> -->
			<view class="share-text">H5链接</view>
		</button>
		<view @click="ab">1212</view>
	</view>
</template>

<script>
// #ifdef APP-NVUE
const dom = weex.requireModule('dom');
// #endif
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {
			// sessionStorage.setItem("asd","ashdkjashd")
			console.log("加载开始")
		},
		onShow(){
			console.log('显示')
		},
		onHide(){
			console.log("消失");
		},
		methods: {
			ab(){
				
				// uni.createSelectorQuery().in(this)
				// 	.select('#cj').boundingClientRect(
				// 			data => {
				// 					console.log("布局位置信息" + JSON.stringify(data));
				// 					// this.headerHeight = data.height
				// 			}
				// 	)
				// 	.exec();
				// const result = dom.getComponentRect(this.$refs.box, (option) => {
        //   console.log("getComponentRect:", option);
        //   this.size = option.size;
        // });
				// console.log(this.$refs.box)
				// let a=document.querySelector('#cj')
				// console.log(a,'1111')
				// console.log(sessionStorage.getItem("asd"));
				// uni.navigateTo({
				// 	url: '/pages/my/index'
				// })
				// console.log(this.$Route)
				// uni.setStorageSync('storage_key', {
				// 	obj:123132132
				// });
				this.$Router.replace({
					path:'/pages/my/index',
					query:{
						id:"1321"
					}
				})
				
				// this.$Route.push({
				// 	path: '/pages/my/index'
				// })
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin: 200rpx auto 50rpx auto;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
